<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户列表</title>
<link href="/include/manage/images/main/style.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="/include/manage/js/jquery.js"></script>
<script language="javascript">
function checkAll() {
	if($('#selAll').attr("checked")){
		$('input[type=checkbox]').attr('checked', $('#selAll').attr("checked")); 
	}else{
		$('input[type=checkbox]').removeAttr("checked");
	}
}

function delSel(){
	if(confirm('确定要删除吗?')){
		var str='';
		$("input[name='sel_id']:checked").each(function(){
			str+=$(this).val()+",";
		});
		//alert("aaaaa"+str);
		if(str.length>0){
			$('#deleteid').val(str);
			$('#delform').submit();
		}
	}
}

function searchUsers(){
	var keywords=$('#key_words').val();
	if(keywords.length>0){
		location.href='/manage_user.ad?parameter=list&key_words='+keywords+'&page=$!frontPage&tid=$!tid';
	}
}
</script>
</head>
<body>
<form id="delform" name="delform" action="/manage_user.ad" method="post">
	<input type="hidden" name="parameter" value="delete" />
	<input type="hidden" id="deleteid" name="id" value="" />
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" background="/include/manage/images/main/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="/include/manage/images/main/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="/include/manage/images/main/tb.gif" width="16" height="16" /></div></td>
                <td width="95%"><span class="STYLE3">当前位置</span>：[用户管理]-[用户列表]</td>
              </tr>
            </table></td>
            <td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td width="60"><table width="90%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="/manage_user.ad?parameter=add&tid=$!tid"><img src="/include/manage/images/main/22.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="/manage_user.ad?parameter=add&tid=$!tid">新增</a></div></td>
                  </tr>
                </table></td>
                <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="javascript:delSel()"><img src="/include/manage/images/main/11.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="javascript:delSel()">删除</a></div></td>
                  </tr>
                </table></td>
								<td width="135"><table width="95%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                  	<td>
                    	搜索:
                    </td>
                    <td>
                    	<input id="key_words" type="text" name="key_words" value="$!key_words" size="8" style="height:16px;border:1px solid #999999;" /></td>
                    <td><a href="javascript:searchUsers()"><img src="/include/manage/images/main/search.gif" /></a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="/include/manage/images/main/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="/include/manage/images/main/tab_12.gif">&nbsp;</td>
        <!--<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onMouseOver="changeto()"  onmouseout="changeback()">-->
		<td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">
  <tr> 
	<td width="55" height="22" background="/include/manage/images/main/bg.gif"><div align="center">选择</div></td>
    <td width="121" background="/include/manage/images/main/bg.gif"><div align="center">用户名</div></td>
    <td width="152" background="/include/manage/images/main/bg.gif"><div align="center">管理级别</div></td>
    <td width="182" background="/include/manage/images/main/bg.gif"><div align="center">用户操作</div></td>
  </tr>
    #foreach ($user in $userList) 
    <tr> 
      <td width="55" valign="top" bgcolor="#FFFFFF"><div align="center">
        <input type="checkbox" name="sel_id" value="$!user.id"></div></td>
     
      <td width="121" bgcolor="#FFFFFF"><div align="center">$!user.username</div></td>
      <td width="152" bgcolor="#FFFFFF"><div align="center">
      #if($user.popedom==3)
      	超级管理员
      #elseif($user.popedom==2)
      	频道管理员
      #elseif($user.popedom==1)
      	频道审核员
      #else
      	频道编辑
      #end</div></td>
      <td width="182" bgcolor="#FFFFFF"><div align="center">
		<a href="/manage_user.ad?parameter=edit&id=$!user.id">编辑</a>&nbsp;&nbsp;
		#if($user.username!="admin")
		<a href="/manage_user.ad?parameter=delete&id=$!user.id">删除</a>&nbsp;&nbsp;
		#end
	</div></td>
    </tr>
    #end 
  </table>
 </td>
        <td width="8" background="/include/manage/images/main/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35" background="/include/manage/images/main/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="35"><img src="/include/manage/images/main/tab_18.gif" width="12" height="35" /></td>
        <td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="STYLE4">&nbsp;&nbsp;共有 $!rows 个用户，当前第 $!currentPage/$!totalPage 页</td>
            <td><table border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40"><a href="/manage_user.ad?parameter=page&page=1&tid=$!tid"><img src="/include/manage/images/main/first.gif" width="37" height="15" /></a></td>
                  <td width="45">#if($frontPage<1)<img src="/include/manage/images/main/back-no.gif" width="43" height="15" />#else<a href="/manage_user.ad?parameter=page&page=$!frontPage"><img src="/include/manage/images/main/back.gif" width="43" height="15" /></a>#end</td>
                  <td width="45">#if($nextPage>$totalPage)<img src="/include/manage/images/main/next-no.gif" width="43" height="15" />#else<a href="/manage_user.ad?parameter=page&page=$!nextPage"><img src="/include/manage/images/main/next.gif" width="43" height="15" /></a>#end</td>
                  <td width="40"><a href="/manage_user.ad?parameter=page&page=$!totalPage&tid=$!tid"><img src="/include/manage/images/main/last.gif" width="37" height="15" /></a></td>
                  <td width="100"><div align="center"><span>转到第
                    <input id="goPage" name="goPage" type="text" size="4" style="height:16px; width:20px; border:1px solid #999999;" /> 
                    页 </span></div></td>
                  <td width="40"><a href="javascript:location.href='/manage_user.ad?parameter=page&tid=$!tid&key_words=$!key_words&page='+document.getElementById('goPage').value"><img src="/include/manage/images/main/go.gif" width="37" height="15" /></a></td>
                </tr>
            </table></td>
          </tr>
        </table>
</td>
        <td width="16"><img src="/include/manage/images/main/tab_20.gif" width="16" height="35" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>
#if($msg)
<script>
alert('$!msg');
</script>
#end